<%--
 $Author: maxc $
 $Rev: 8002 $
 $Date:: 2013-06-17 16:39:04#$:

 Copyright (C) 2012 Seeyon, Inc. All rights reserved.
 This software is the proprietary information of Seeyon, Inc.
 Use is subject to license terms.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page isELIgnored="false" import="com.seeyon.ctp.common.AppContext,com.seeyon.ctp.common.constants.ProductEditionEnum,java.util.Locale"%>
<%@ page isELIgnored="false" import="com.seeyon.apps.agent.utils.AgentUtil"%>
<%@ page isELIgnored="false" import="com.seeyon.ctp.util.TimeZoneUtil"%>
<%@ page isELIgnored="false" import="com.seeyon.ctp.common.flag.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="ctp" uri="http://www.seeyon.com/ctp"%>
<%@ taglib prefix="main" uri="http://v3x.seeyon.com/taglib/main"%>
<%@ taglib uri="http://v3x.seeyon.com/taglib/core" prefix="v3x"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%><fmt:setTimeZone value="${ctp:getUserTimeZone()}" scope="session"/>
<%
response.setDateHeader("Expires",-1);
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragrma","no-cache");
%>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-stand|ie-comp">
<META HTTP-EQUIV="pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate" />
<META HTTP-EQUIV="expires" CONTENT="-1" />
<%
    Locale locale = AppContext.getLocale();
    boolean isDevelop = AppContext.isRunningModeDevelop();
%>
<c:set var="path" value="${pageContext.request.contextPath}" />
<c:set value="${ctp:currentUser().userSSOFrom}" var="topFrameName" />
<title>中国人民解放军第五七一五工厂</title>
<link href="/seeyon/common/images/${ctp:getSystemProperty('portal.porletSelectorFlag')}/favicon${ctp:getSystemProperty('portal.favicon')}.ico" type="image/x-icon" rel="icon"/>
<link rel="stylesheet" type="text/css" href="/seeyon/main/common/css/frame-common.css${ctp:resSuffix()}" />
<link rel="stylesheet" type="text/css" href="/seeyon/common/image/css/touchTouch.css${ctp:resSuffix()}" />
<script type="text/javascript">
var _locale = '<%=locale%>';
var _ctxPath = '/seeyon';
var _isDevelop = <%=isDevelop%>;
var _editionI18nSuffix = '<%=ProductEditionEnum.getCurrentProductEditionEnum().getI18nSuffix()%>';
<%-- æ¯å¦ä»è´ä¿¡é£è¾¹è¿å¥åå --%>
var openFrom = "${ctp:escapeJavascript(openFrom)}";
</script>
<script type="text/javascript" src="/seeyon/common/js/index_i18n_<%=locale%>.js${ctp:resSuffix()}"></script>
<%
    if (isDevelop) { //isDevelop
%>
<script type="text/javascript" src="/seeyon/common/js/v3x-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/jquery-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/main/common/js/jquery-ui.draggable-min.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/misc/Moo-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/misc/jsonGateway-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/jquery.json-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/common-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/ui/seeyon.ui.dialog-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/ui/seeyon.ui.progress-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/ui/seeyon.ui.checkform-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/ui/seeyon.ui.projectTaskDetailDialog-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/message/BaseMessage.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/message/onlinemessage.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/message/imMessage.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/message/openMessage.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/message/Message.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/message/sectionMappingLinkType.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/SelectPeople/js/orgDataCenter.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/apps_res/doc/js/knowledgeBrowseUtils.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/main/common/js/frame-ajax.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/collaboration/collShowSummary.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/common/js/jquery.comp-debug.js${ctp:resSuffix()}"></script>
<script type="text/javascript" src="/seeyon/main/common/js/skinChange.js${ctp:resSuffix()}"></script>
<%
    } else {
%>
<script type="text/javascript" src="/seeyon/main/common/js/frame-min.js${ctp:resSuffix()}"></script>
<%
    }
%>
<script type="text/javascript" src="/seeyon/messageLinkConstants.js${ctp:resSuffix()}"></script>
<script type="text/javascript">
$.ctx = {};
$.ctx.customize = <c:out value="${ctp:getCustomizeJsonStrByKeys('default_page,desk_background_image,desktop_background_color,productView,workDesktopEnabled,left_panel_set,grid_pref')}" default="null" escapeXml="false"/>;
$.ctx.CurrentUser = <c:out value="${CurrentUser.userInfoJsonStr}" default="null" escapeXml="false"/>;
$.ctx.menu = <c:out value="${ctp:getMenuJsonStr()}" default="null" escapeXml="false"/>;
$.ctx.space = <c:out value="${ctp:getPortalSpaceJsonString()}" default="null" escapeXml="false"/>;
$.ctx.template = <c:out value="${pageRenderResult.hostSpotsJson}" default="null" escapeXml="false"/>;
$.ctx.shortcut = <c:out value="${ctp:getShortcutsJsonStr()}" default="null" escapeXml="false"/>;
$.ctx.concurrentAccount = <c:out value="${ctp:getConcurrentAccountJsonStr()}" default="null" escapeXml="false"/>;
<%-- æ¯å¦admin --%>
var isCurrentUserAdmin = "${CurrentUser.admin}";
<%-- æ¯å¦éå¢ç®¡çå --%>
var isCurrentUserGroupAdmin = "${CurrentUser.groupAdmin}";
<%-- æ¯å¦åä½ç®¡çå --%>
var isCurrentUserAdministrator = "${CurrentUser.administrator}";
<%-- æ¯å¦è¶çº§ç®¡çå --%>
var isCurrentUserSuperAdmin = "${CurrentUser.superAdmin}";
<%-- æ¯å¦ç³»ç»ç®¡çå --%>
var isCurrentUserSystemAdmin = "${CurrentUser.systemAdmin}";
<%-- æ¯å¦å®¡è®¡ç®¡çå --%>
var isCurrentUserAuditAdmin = "${CurrentUser.auditAdmin}";
<%-- å¤´åå°å --%>
var memberImageUrl = "${ctp:avatarImageUrl(CurrentUser.id)}";
var currentSpaceForNC = "${currentSpaceForNC}";
var isAdmin = "${CurrentUser.admin}";
<%-- æ¢è¤åé --%>
var skinPathKey = "${skinPathKey}";
var resSuffix = "${ctp:resSuffix()}";
<%-- å­ä½åé --%>
var font_size = "${CurrentUser.fontSize}";
<%-- æ¾ç¤ºäº§åå¯¼èª  --%>
var productVersion = "${ctp:getSystemProperty('portal.porletSelectorFlag')}";
var productAbout = "${ctp:getSystemProperty('portal.about')}";
var systemProductId = "${ctp:getSystemProperty('system.ProductId')}";
var isProductViewRefresh = "${isRefresh}";
var hasPluginUC = "${ctp:hasPlugin('uc')}";
var logoutConfirm_I18n = "${ctp:i18n('system.logout.confirm')}";
<%-- æ¢è¤ç»ä»¶åæ¢é¦é¡µæ¨¡çåé»è®¤æ¾ç¤ºæ¢è¤ç»ä»¶ --%>
var showSkinchoose = "${ctp:escapeJavascript(showSkinchoose)}";
<%-- éå¢/åä½ç®¡çåæ¯å¦ååæ¢è¿å¸å±ï¼å°æªä¿å­å°æ°æ®åºï¼ --%>
var isPortalTemplateSwitching = "${ctp:escapeJavascript(isPortalTemplateSwitching)}";
<%-- æ¯å¦å·æåéææºç­ä¿¡çæé --%>
var isCanSendSMS = "${isCanSendSMS}";
<%-- æ¯å¦éè¦æ­æ¾å£°é³ --%>
var isEnableMsgSound = <c:out value="${isEnableMsgSound}" default="false" />;
<%-- æ¶æ¯æ¥çåæ¯å¦å³é­ --%>
var msgClosedEnable = <c:out value="${msgClosedEnable}" default="false" />;
<%-- æ¶é´è½´ä¸æä»¶å¤æ­ --%>
var hasEdocPlugin = ${ctp:hasPlugin('edoc')};
var hasTaskmanagePlugin = ${ctp:hasPlugin('taskmanage')};
var hasPlanPlugin = ${ctp:hasPlugin('plan')};
var hasCalendarPlugin = ${ctp:hasPlugin('calendar')};

<%-- å¤æ­æ¯å¦æ¾ç¤ºèªèµæ¥ç
var isShowSalary = "${v3x:hasPlugin('hr')}";--%>

var message_header_system_label = "${ctp:i18n('message.header.system.label')}";
var message_header_person_label = "${ctp:i18n('messageManager.count.person')}";
var message_person_reply_label = "${ctp:i18n('message.person.reply.label')}";
var message_header_unit_label = "${ctp:i18n('message.header.unit.label')}";
var message_header_close_alt = "${ctp:i18n('message.header.close.alt')}";
var message_header_max_alt = "${ctp:i18n('message.header.max.alt')}";
var message_header_mini_alt = "${ctp:i18n('message.header.mini.alt')}";
var message_header_more_alt = "${ctp:i18n('message.header.more.alt')}";

<%-- æ·»å "å¿å"åèµ·èåç§°ä½ä¸ºå¨å±åé --%>
var ANNONYMOUS_NAME = "${ctp:i18n('annonymous_name')}";

var v3x = new V3X();
v3x.init("${pageContext.request.contextPath}", "<%=com.seeyon.ctp.common.i18n.LocaleContext.getLanguage(request)%>");
v3x.loadLanguage("/apps_res/agent/js/i18n");
var indexErr = "${ctp:i18n('index.input.error')}";

var pwdmodify_force_enable = '${pwdmodify_force_enable}';
var login_validatePwdStrength = ${login_validatePwdStrength == null ? true : login_validatePwdStrength};
var isPwdExpirationInfoNotEmpty = ${!empty pwdExpirationInfo};
var isPwdExpirationInfo1Empty = ${empty pwdExpirationInfo[1]};
var isNotPersonModifyPwd = ${!personModifyPwd};

<c:if test="${checkPwd==null}" >
var checkPwd;
</c:if>
<c:if test="${checkPwd!=null}" >
var checkPwd = ${checkPwd};
</c:if>
var datePwd = "";
<c:if test="${not empty pwdExpirationInfo[1]}" >
datePwd = "${ctp:formatDateTime(pwdExpirationInfo[1])}";
</c:if>
<%
//å¤æ­æ¯å¦æä»£ç
boolean hasAgent= AgentUtil.hasAgentInfo();
pageContext.setAttribute("hasAgent", hasAgent);

if(hasAgent){
  //å¤æ­æ¯å¦å¼¹åºä»£ç æç¤º
  String agentInfo = AgentUtil.agentSettingAlert();
  if (agentInfo != null && !"".equals(agentInfo)) {
      String info[] = agentInfo.split("::");
      pageContext.setAttribute("message", info[0]);
      pageContext.setAttribute("ids", info[1]);
  }
}
String timeZoneInfo = TimeZoneUtil.timeZoneSettingAlert();
if (timeZoneInfo != null && !"".equals(timeZoneInfo)) {
  pageContext.setAttribute("timeZoneAlertMessage", timeZoneInfo);
}

%>
var messageForAgentAlert = "${ctp:urlEncoder(message)}";
var idsForAgentAlert = "${ids}";
var isMessageForAgentAlertNotEmpty = ${not empty message};
var isIdsForAgentAlertNotEmpty = ${not empty ids};

var timeZoneAlertMessage = "${timeZoneAlertMessage}";
var timeZoneAlertNotEmpty = ${not empty timeZoneAlertMessage};

var requestSchemeServerName = "<%=request.getScheme()%>://<%=com.seeyon.ctp.util.Strings.getServerName(request)%>";
var requestServerPort = "<%=request.getServerPort()%>";
var currentUserLoginName = "${ctp:escapeJavascript(CurrentUser.loginName)}";
var currentUserName = "${ctp:escapeJavascript(CurrentUser.name)}";
<%
String sessionId = session.getId();
String route = "";
Cookie[] cookie = request.getCookies();
for(int i = 0; i < cookie.length; i++) {
  if(cookie[i].getName().trim().equalsIgnoreCase("JSESSIONID")) {
      sessionId = cookie[i].getValue().trim();
  }
  if(cookie[i].getName().trim().equalsIgnoreCase("route")) {
	route = cookie[i].getValue().trim();
  }
}

%>
var sessionId = "<%=sessionId%>";
var route = "<%=route%>";
var currentSessionId = "<%=session.getId()%>";
var geniusVersion_sysProperty = "${ctp:getSystemProperty('genius.version')}";
var systemHelp_sysProperty = "${ctp:getSystemProperty('system.help')}";
var currentUserLocale = "${CurrentUser.locale}";
var isTopFrameNameNotNull = "${topFrameName != null}";
var browserFlagByUser = ${ctp:getBrowserFlagByUser("CloseWindowLogout", ctp:currentUser())};
var currentPortalTemplate = "default";
var isV5Member = ${CurrentUser.externalType == 0}; //æ¯å¦æ¯V5äººå
</script>
